Currently, a Border Gateway Protocol/Multiprotocol Label Switching Layer 3 virtual private network (BGP/MPLS Layer 3 VPN) is widely applied. However, due to rapid development of services such as an Internet Protocol (IP) television (IPTV), a multicast service is in an urgent need of using an existing unicast network architecture to implement multicast data forwarding based on the BGP/MPLS Layer 3 VPN. Based on the foregoing reason, a multicast virtual private network (MVPN) emerges.
A Border Gateway Protocol (BGP)-based MVPN is put forward in the prior art, and is referred to as the BGP-based MVPN in this specification. In the BGP-based MVPN, PE devices are classified into two roles, that is, a root node and a leaf node. A root node refers to a PE device in the MVPN the root node connects to a multicast source and sends multicast data to another PE device. A leaf node refers to a PE device to which a multicast receiver connects. For example, in a BGP-based MVPN, there may be multiple multicast trees, and a PE device may be a root node in multicast tree 1 and a leaf node in multicast tree 2 and multicast tree 3.
In a BGP-based MVPN, when a first PE device needs to know a role of a BGP neighbor and a working status of the BGP neighbor in the same BGP-based MVPN, the role of the BGP neighbor and the working status of the BGP neighbor need to be configured on the first PE device. However, this manual configuration method causes complex network configuration; especially when there are many BGP neighbors of the first PE device in the MVPN, a configuration workload is extremely heavy, and an error is easy to occur.